﻿using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Text;

namespace Lrd.Template.Core.Infrastructure.Modules
{
    /// <summary>
    /// 模块管理
    /// </summary>
    public interface IModuleManager
    {


        IEnumerable<ModuleBase> SourceModules { get; }

        IEnumerable<ModuleBase> LoadedModules { get; }


        /// <summary>
        /// 加载模块服务
        /// </summary>
        /// <param name="services">服务容器</param>
        /// <returns>服务容器</returns>
        IServiceCollection LoadModules(IServiceCollection services);

        /// <summary>
        /// 应用模块服务
        /// </summary>
        /// <param name="provider">服务提供者</param>
        void UsePack(IServiceProvider provider);
    }
}
